<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('鸡日报列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
	<div class="row" id="printArea">
		<div class="col-sm-12 search-collapse">
			<form id="formId">
				<div class="select-list">
					<ul>
						<li class="select-time">
							<label>日期： </label>
							<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]" lay-key="1" th:value="${beginTime}" >
							<span>-</span>
							<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]" lay-key="2"  th:value="${endTime}">
						</li>

						<li>
							<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
						</li>
					</ul>
				</div>
			</form>
		</div>

		<h3 align="center"> <span th:text="日报表" id="ordercode" hidden="hidden"></span> </h3>
		<div class="col-sm-12 select-table table-striped">
			<div class="btn-group-sm" id="toolbar1" role="group">

				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:ncChickenDayCensus:export">
					<i class="fa fa-download"></i> 导出
				</a>
				<a class="btn btn-warning" id="print-btn" orderType = "20"  nohide="1" >
					<i class="fa fa-download"></i> 打印
				</a>
				<!--            <div></div>-->
			</div>
			<table id="bootstrap-table" data-mobile-responsive="true"></table>
			<h3> <span class="fl-l" id="autograph" hidden="hidden"></span> </h3>
		</div>
	</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:ncChickenDayCensus:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:ncChickenDayCensus:remove')}]];
    var prefix = ctx + "system/ncChickenDayCensus";
    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "鸡日报",
            showExport: false,
            showSearch: false,
            showRefresh: false,
            showColumns: false,
            showToggle: false,
            toolbar: 'toolbar1',
            sortName:'dateTime',
            sortOrder:'desc',
            columns: [
                {
                    title: '序号',
                    formatter: function (value, row, index) {
                        return $.table.serialNumber(index);
                    }
                },
                {
                    field : 'censusId',
                    title : '主键',
                    visible: false
                },
                {
                    field : 'cunAmount',
                    title : '存栏数量（只）',
                    sortable: true
                },
                {
                    field : 'inputAmount',
                    title : '外购数量（只）',
                    sortable: true
                },
                {
                    field : 'outputAmountBig',
                    title : '直供大数量（只）',
                    sortable: true
                },
                {
                    field : 'outputAmountLittle',
                    title : '直供小数量（只）',
                    sortable: true
                },
                {
                    field : 'neiXiao',
                    title : '内销数量（只）',
                    sortable: true
                },
				/*{
					field : 'die',
					title : '死亡数量（只 ）',
					sortable: true
				},*/
				{
					field : 'dieSmall',
					title : '死亡小鸡数量（只 ）',
					sortable: true
				},
				{
					field : 'dieBig',
					title : '死亡大鸡数量（只 ）',
					sortable: true
				},
                {
                    field : 'zfeed',
                    title : '日喂主料（kg）'
                },
                {
                    field : 'ffeed',
                    title : '日喂辅料（kg）'
                },

                {
                    field : 'dateTime',
                    title : '时间',
                    sortable: true
                },
            ]
        };
        $.table.init(options);
    });
    setTitle("鸡舍管理-日报表",true)
</script>
</body>
</html>